package repository

import (
	"ruoyi/domain/entity/common"
	"ruoyi/domain/entity/response"
	"ruoyi/domain/entity/system"
)

type SysRoleRepository interface {
	SelectRolePermissionByUserId(userId int) []system.SysRole

	BuildRolePermissionByUserId(userId int) []string

	GetRolePermission(user system.SysUser) []string

	GetRolePermissionById(userId int) []string

	GetMenuPermission(user system.SysUser) []string

	SelectRolesByUserName(userName string) string

	SelectRoleList(params common.SearchTableDataParam, isPage bool) common.TableDataInfo

	AddRolesByUser(user system.SysUserParam)

	InsertRolesByUser(userId int, roleIds []int) response.Response

	DeleteRolesByUser(userId []int)

	DeleteRolesById(roleId string, userId int)

	FindRoleInfoById(roleId string) system.SysRole

	CheckRoleDataScope(roleId string) bool

	SaveRole(roles system.SysRolesParam) response.Response

	UploadRole(rolesParam system.SysRolesParam, userId int) response.Response

	PutDataScope(rolesParam system.SysRolesParam, userId int) response.Response

	ChangeRoleStatus(rolesParam system.SysRole, userId int) response.Response

	GetRoleOptionSelect() response.Response

	GetAllocatedList(params common.SearchTableDataParam) common.TableDataInfo

	GetUnAllocatedList(params common.SearchTableDataParam) common.TableDataInfo

	CancelRole(userId int, roleId int) response.Response

	CancelAllRole(roleId string, userIds string) response.Response

	SelectRoleAll(roleId string, userIdStr string, userId int) response.Response

	GetDeptTreeRole(roleId string) []int
}
